package objectorientiertes_programmieren;

public abstract class WorkInterface {

	
	public abstract double calcPlus(MyObject obj);
	
	public abstract double calcMinus(MyObject obj);
	
	public abstract double calcMultiply(MyObject obj);
	
	public abstract double calcDivide(MyObject obj);
	
	public void calculate(MyObject obj){
		
		if (obj.getZeichen()=='+'){
			
			obj.setErgebnis(calcPlus(obj));
		}else if (obj.getZeichen()=='-'){
			
			calcMinus(obj);
		}else if (obj.getZeichen()=='*'){
			
			obj.setErgebnis(calcMultiply(obj));
		}else if (obj.getZeichen()=='/'){
			
			obj.setErgebnis(calcDivide(obj));
		}
		
		
	}
	
	
	
}
